<?php

#[('获取一个类到底实例化多少个对象')]
class Person
{
    public $name = "www.hflxhn.com";
    public static $tot;

    public function __construct()
    {
        SELF::$tot++;
    }

    public function start()
    {
        echo "my host is {$this->name}";
    }
}

$obj1 = new Person();
$obj2 = new Person();
$obj3 = new Person();
$obj4 = new Person();
$obj5 = new Person();
$obj6 = new Person();
echo Person::$tot;
